<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改商品</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/device2.css"/>
</head>
<body>
<%
    String user_id = (String) session.getAttribute("user_id");
    Boolean power = (Boolean) session.getAttribute("power");
%>
<%if(power!=null && user_id!= null && power){ %>
<h2>修改商品</h2>

<form action="<%=request.getContextPath()%>/alterGood.do" method="get">
    <label for="goods_id">要修改的商品id：</label>
    <input type="text" id="goods_id" name="goods_id" required><br>

    <label for="goods_name">修改后的商品名：</label>
    <input type="text" id="goods_name" name="goods_name" required><br>

    <label for="category">修改后的种类：</label>
    <select id="category" name="category">
        <option value="书籍">书籍</option>
        <option value="电脑">电脑</option>
        <option value="衣服">衣服</option>
        <option value="家具">家具</option>
    </select><br>

    <label for="unitprice">"修改后的价格：</label>
    <input type="password" id="unitprice" name="unitprice" required><br>

    <label for="stock">修改后的库存：</label>
    <input type="text" id="stock" name="stock"><br>

    <label for="factory">修改后的工厂：</label>
    <input type="text" id="factory" name="factory"><br>

    <label for="photo">修改后的商品图片存储位置：</label>
    <input type="text" id="photo" name="photo" placeholder="例如: C:\Images\myproduct.jpg" ><br>

    <label for="details">修改后的商品描述：</label>
    <textarea id="details" name="details" rows="8" cols="40">
    </textarea>

    <button type="submit">修改商品</button>
</form>
<%}else{%>
<h5>您好！您无权限进入此页面！</h5>
<% }%>
</body>
</html>
